﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace CarwashLibrary.CW_Functions
{
    public class CW_Funtions
    {
        #region constants
            private const int MANAGER = 1;
            private const int OPERATOR = 2;
            private const int DELUXE = 3;
            private const int SUPER = 4;
            private const int ULTRA = 5;
            private const int INVALID_PIN = 0;
        #endregion
            public int enterPin(int pin)
            {
                // TODO: fix it
                //EventHandler event_handler = new EventHandler();    
                //return event_handler.validatePin(pin);
                return 0;
            }

            public int requestCarwash(int cwRequested)
            {
                switch (cwRequested)
                {
                    case OPERATOR:
                        {
                            return OPERATOR;
                        }

                    case MANAGER:
                        {
                            return MANAGER;
                        }

                    case DELUXE:
                        {
                            return DELUXE;
                        }

                    case ULTRA:
                        {
                           return ULTRA;
                        }

                    case SUPER:
                        {
                            return SUPER;
                        }

                    default:
                        // You can use the default case.
                        return INVALID_PIN;
                }
            }

            public bool payCarwashWithCash()
            {
                return false;
            }

            public bool payCarwashWithCreditCard(string cardNumber)
            {
                return false;
            }
    }
}
